  Handlebars.registerHelper('if_eq', function(v1, v2, opts) {
      if(v1 == v2)
      return opts.fn(this);
      else
      return opts.inverse(this);
      });
  var tpl  =  $("#myTemplate").html();
        var template = Handlebars.compile(tpl);
        $.ajax({
           url:"/fund.json",
           type:"get",
            dataType:"json",
              data:{
                pageSize:10
              },
           success:function(data){
                console.log(data)
                var arr = [];
                arr = data;
                $('#pagination').jqPaginator({
                            totalPages: data.data.totalPages,
                            visiblePages: 10,
                            currentPage: 1,
                            onPageChange:function(currentPage,type){
                                $.ajax({
                                   url:"/fund.json",
                                   type:"get",
                                    dataType:"json",
                                   success:function(data){
                                        console.log(data)
                                        var arr = [];
                                        arr = data;
                                        var html = template(data);
                                                        $('.project-content').empty();
                                                        $('.project-content').append(html);
                                    },
                                    error: function(msg) {
                                        console.log(msg)
                                    }
                                })
                            },
                            first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
                            prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
                            next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
                            last: '<li class="last"><a href="javascript:void(0);">尾页</a></li>',
                            page: '<li class="page"><a href="javascript:void(0);" class="page-a">{{page}}</a></li>',
                        });
                var html = template(data);
                $('.project-content').empty();
                $('.project-content').append(html);
            },
            error: function(msg) {
                console.log(msg)
            }
        })